Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Printing /
Chapter 4 - Advanced Printing Features / Advanced Printing Features Reference
Functions / Working With QuickDraw GX Print Files


GXReplacePrintFilePage

You can use the GXReplacePrintFilePage function to replace a page in a print file object.

void GXReplacePrintFilePage (gxPrintFile aPrintFile,
                           long pageNumber, gxFormat pageFormat,
                           gxShape pageShape);
aPrintFile
A reference to the print file object in which you want to replace a page.
pageNumber

The page you want to replace.
pageFormat

A reference to the page's format object.
pageShape
A reference to the page's picture shape object.
DESCRIPTION
The GXReplacePrintFilePage function replaces in the page specified in the pageNumber parameter.

You specify a replacement page format and page shape in the pageFormat and pageShape parameters, respectively. You can specify nil for either of these parameters to ensure that the page format or the page shape remains unchanged.

Any changes you make to a print file are not permanent until you save the print file object with the GXSavePrintFile function.

SPECIAL CONSIDERATIONS
After you call the GXReplacePrintFilePage function, do not change the page format or page shape referenced by the pageFormat and pageShape parameters. For example, if you want to change the format or shape later, make a copy, and modify the copy. Dispose of the original page or format after you make the copy.

For speed and memory efficiency, dispose of the references to the format and page parameters immediately after you call GXReplacePrintFilePage.

If a format or page is to be duplicated, passing a clone of the object to the function is more efficient than passing a copy. For example, you can pass a clone of a page or format to replicate a page or format already in the file. The cloned object may be one that you have previously read from a print file or one that you created.

RESULT CODES
gxSegmentLoadFailedErrA required code segment could not be found, or there was not enough memory to load it.
SEE ALSO
To save a print file object, see the description of the GXSavePrintFile function on page 4-70.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help